package two.chapter_1.c1_3;

import edu.princeton.cs.algs4.StdOut;


public class Ex1_3_15 {

    public static void main(String [] args){
        int k=3;
        String []inputs="abcdefg".split("");
        LinkedQueue<String> queue=new LinkedQueue<>();
        for (int i=0;i<inputs.length;i++){
            queue.enqueue(inputs[i]);
        }

        int delta=queue.size()-k+1;
        int count=0;
        String val="";
        while (delta!=count){
            val=queue.dequeue();
            count++;
        }
        StdOut.println(val);
    }


}
